<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:form id="frmCreatePayment">
        <f:view>
            <p:dialog id="dlgCreatePayment"
                      widgetVar="wgCreatePayment"
                      header="Create Payment"
                      draggable="true"
                      showEffect="fade"
                      hideEffect="clip">


                <h:panelGrid  id="pnCreatePayment" columns="2">
                    <p:outputLabel value="Hospital:" for="hospital" />
                    <p:selectOneMenu id="hospital" value="#{paymentManagement.hospital.hospitalId}" >
                        <f:selectItems value="#{hospitalManagement.list}" var="item" itemLabel="#{item.hospitalName}" itemValue="#{item.hospitalId}"/>
                    </p:selectOneMenu>
                    <p:outputLabel value="Banking:" for="banking" />
                    <p:selectOneMenu id="banking" value="#{paymentManagement.banking.bankId}"  >
                        <f:selectItems value="#{bankingManagement.list}" var="item" itemLabel="#{item.bankName}" itemValue="#{item.bankId}"/>
                    </p:selectOneMenu>
                </h:panelGrid>


                <f:facet name="footer">
                    <p:commandButton  id="btnCreatePayment"
                                      value="Create"
                                      icon="ui-icon-check"
                                      style="margin:0"
                                      actionListener="#{paymentManagement.create}"
                                      update=":frmViewPayment:dtViewPayment,
                                      :growl,
                                      :frmCreatePayment:pnCreatePayment"
                                      oncomplete="PaymentManagementRequest(xhr, status, args)"
                                      />
                    <p:commandButton id="btnCancelCreatePayment"
                                     value="Cancel"
                                     icon="ui-icon-check"
                                     style="margin:0"
                                     onclick="wgCreatePayment.hide();"
                                     />
                </f:facet>
            </p:dialog>
        </f:view>
    </h:form>
</html>
